$(function (){
    //获取公司信息
    $.get({
        url: 'http://localhost:8080/company/find',
        dataType:'json',
        success:function (res){
            $('#logo').attr('src',res.data.logoLocation)
            $('#chineseName').html(res.data.chineseName)
            $('#englishName').html(res.data.englishName)
            $('#introduction').html(res.data.introduction)
            $('#qqID').html(res.data.qqID)
            $('#wbID').html(res.data.wbID)
            $('#weChat').html(res.data.weChat)
            $('#telephone').html(res.data.telephone)
            $('#email').html(res.data.email)
            $('#address').html(res.data.address)
        }
    })
    //获取导航标签
    $.get({
        url: 'http://localhost:8080/nav/find',
        dataType: 'json',
        success(res){
            let nav=$('#nav')
            if(res.data.length>0){
                nav.empty();
                for (const datum of res.data) {
                    let div='<div onclick="location.href=\'/front'+datum.navHref+'.html\'">'+datum.navName+'</div>'
                    nav.append(div)
                }
            }
        }
    })
})